<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Vue</title>
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<div id="app_sy">
    <h2 v-fontsize="'10px'">{{msg}}</h2>
</div>

<script>
    new Vue({
        el: '#app_sy',
        data: {
            msg: new Date()
        },
        methods: {},
        directives: {
            'fontsize': function (el, binding) {
                el.style.fontSize = parseInt(binding.value) + 'px'
            }
        }
    })
</script>
</body>
</html>